import fetch from 'common/src/utils/fetch';

/**
 * 预警学生名单列表
 */
function getLoserStudent(data) {
    return fetch({
        url: '/api/electionservice/loserStudent/findElcLoserStds',
        method: 'post',
        data: data
    });
}


/**
 * 预警学生选课列表
 */
function getLoserStudentCourse(calendarId,studentId) {
    return fetch({
        url: '/api/electionservice/loserStudent/findStudentElcCourse?calendarId='+calendarId+'&studentId='+studentId,
        method: 'get'
    });
}

/**
 * 移除预警学生
 */
function deleteLoserStudent(data) {
    return fetch({
        url: '/api/electionservice/loserStudent/deleteLoserStudent',
        method: 'post',
        data:data
    });
}

/**
 * 预警学生退课
 */
function withdrawCourse(data) {
    return fetch({
        url: '/api/electionservice/loserStudent/withdrawCourse',
        method: 'post',
        data:data
    });
}

/**
 * 预警学生导出
 */
function exportLoserStu(data) {
    return fetch({
        url: '/api/electionservice/loserStudent/exportLoserStu',
        method: 'post',
        data:data
    });
}


/**
 * 预警学生导出状态
 */
function exportStatus(key) {
    return fetch({
        url: '/api/electionservice/reportManagement/result/'+key,
        method: 'get'
    });
}

/**
 * 刷新预警学生
 */
function reloadLoserStu(calendarId) {
    return fetch({
        url: '/api/electionservice/loserStudent/reLoadLoserStu?calendarId='+calendarId,
        method: 'get'
    });
}

/**
 * 刷新预警学生进度显示
 */
function findReloadStatus(key) {
    return fetch({
        url: '/api/electionservice/loserStudent/findReloadStatus?key='+key,
        method: 'get'
    });
}

findReloadStatus


export default {
    getLoserStudent:getLoserStudent,
    getLoserStudentCourse:getLoserStudentCourse,
    deleteLoserStudent:deleteLoserStudent,
    withdrawCourse:withdrawCourse,
    exportLoserStu:exportLoserStu,
    exportStatus:exportStatus,
    reloadLoserStu:reloadLoserStu,
    findReloadStatus:findReloadStatus
};